//
//  ZXLHomeListCell.m
//  EPA
//
//  Created by 朱兴隆 on 16/4/20.
//  Copyright © 2016年 朱兴隆. All rights reserved.
//

#import "ZXLHomeListCell.h"
#import "ImageLoading.h"
@interface ZXLHomeListCell ()
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UIImageView *titleImageView;
@property (weak, nonatomic) IBOutlet UILabel *contentLabel;
@property (weak, nonatomic) IBOutlet UIImageView *coverImgView;


@end
@implementation ZXLHomeListCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)setModel:(ZXLHomeListModel *)model {
    if (_model != model) {
        _model = model;
    }
}

- (void)layoutSubviews {
    
    self.titleLabel.text = self.model.title;
    self.contentLabel.text = self.model.content;
    
    [[ImageLoading shareImageLoading] imageLoadingWithString:self.model.coverimg returnImageBlock:^(NSData *data) {
        self.coverImgView.image = [UIImage imageWithData:data];
    }];
}
@end
